package com.qf.feign.api;

import com.qf.feign.impl.UserServiceImpl;
import com.qf.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        name = "user", // 服务名称
        path = "/user", // namespace
        fallback = UserServiceImpl.class // 本地降级
)
public interface UserService {

    @PostMapping("/addUser")
    public Boolean addUser(@RequestBody User user);

    @GetMapping("/getUserList")
    public List<User> getUserList();

    @PostMapping("/queryUserList")
    List<User> queryUserList(User user);
}
